package com.nanfangzhe.shirodemo.service.impl;

import com.nanfangzhe.shirodemo.entity.URole;
import com.nanfangzhe.shirodemo.entity.URolePermission;
import com.nanfangzhe.shirodemo.mapper.URolePermissionMapper;
import com.nanfangzhe.shirodemo.service.URolePermissionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色与权限对应表 服务实现类
 * </p>
 *
 * @author nanfangzhe
 * @since 2020-11-25
 */
@Service
public class URolePermissionServiceImpl extends ServiceImpl<URolePermissionMapper, URolePermission> implements URolePermissionService {
	@Autowired
	private URolePermissionMapper dao;
	
	@Override
	public List<URolePermission> getPers(int rid) {
		QueryWrapper<URolePermission> wrapper = new QueryWrapper<URolePermission>();
		wrapper.eq("rid", rid);
		return dao.selectList(wrapper);
	}

}
